package com.qfedu.mtl.service.impl;

import com.qfedu.mtl.dao.SystemlogsDao;
import com.qfedu.mtl.dao.impl.SystemlogsDaoImpl;
import com.qfedu.mtl.entity.Systemlogs;
import com.qfedu.mtl.query.SystemlogsQuery;
import com.qfedu.mtl.service.SystemlogsService;
import com.qfedu.mtl.util.page.Pager;

import java.util.List;

/**
 * @version v1.0
 * @Author NVSonar
 * @Date 2023/9/26 21:34
 * @Email 1595220980@qq.com
 */
public class SystemlogsServiceImpl implements SystemlogsService {
	SystemlogsDao systemlogsDao=new SystemlogsDaoImpl();
	@Override
	public Pager<Systemlogs> findPage(Integer page, Integer size, SystemlogsQuery query) {
		List<Systemlogs> list = systemlogsDao.selectData(page, size, query);
		Integer total = systemlogsDao.selectTotal(query);
		Pager<Systemlogs> pager = new Pager<>(list, page, size,total);
		return pager;
	}

	@Override
	public List<Systemlogs> findAll() {
		return systemlogsDao.selectAll();
	}

	@Override
	public List<Systemlogs> findData(Integer page, Integer size, SystemlogsQuery query) {
		return systemlogsDao.selectData(page,size,query);
	}

	@Override
	public void add(Systemlogs systemlogs) {
		systemlogsDao.insert(systemlogs);
	}


}
